// AdjacencyMatrix.cpp : This file contains the 'main' function. Program execution begins and ends there.
//

#include <iostream>
#include"AdjacencyMatrix.h"
#include"DFS.h"
#include"BFS.h"

int main()
{
    Graph* graph = InitGraph(5);
    int edges[5][5] = {
        0, 1, 0, 1, 0,
        1, 0, 1, 1, 1,
        0, 1, 0, 0, 0,
        1, 1, 0, 0, 1,
        0, 1, 0, 1, 0
    };

    char* vertices = "abcde";
    CreateGraph(graph, vertices, *edges);

    //深度优先遍历
    printf("深度优先遍历\n");
    int isVisitedDFS[] = { 0, 0, 0, 0, 0 };
    DFS(graph, isVisitedDFS, 0);

    printf("\n广度优先遍历\n");
    int isVisitedBFS[] = { 0, 0, 0, 0, 0 };
    BFS(graph, isVisitedBFS, 0);
}
